-- background: 3305 from stack: in.0 -- bmap block id: 3687 -- flags: 0000 -- background id: 0 -- name: theBackground ----- HyperTalk script ----- on newCard tabKey end newCard on openCard set hilite of background button "Cleared" to false set hilite of background button "Deposit" to false set hilite of background button "Withdrawl" to false if background field "Cleared" is "C" then set hilite of background button "Cleared" to true else set hilite of background button "Cleared" to false end if if background field "Code" is "W" then set hilite of background button "Withdrawl" to true else set hilite of background button "Deposit" to true end if global accountNumber,Balance put accountNumber into background field "Account Number" set numberFormat to "#.00" put Balance into background field "Balance" add 0 to background field "Amount" end openCard on closeCard get the short name of this card if it is empty then put empty into background field "Account Number" put empty into background field "Balance" end if end closeCard -- part 1 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=249 top=239 right=266 bottom=280 -- title width / last selected line: 0 -- icon id / first selected line: 1013 / 1013 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Next ----- HyperTalk script ----- on mouseUp go to next card end mouseUp -- part 2 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=217 top=239 right=266 bottom=248 -- title width / last selected line: 0 -- icon id / first selected line: 1014 / 1014 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Prev ----- HyperTalk script ----- on mouseUp go to prev card end mouseUp -- part 4 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=394 top=281 right=342 bottom=451 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Compact ----- HyperTalk script ----- on mouseUp put the number of cards into temp if temp > 22 then answer "Delete first 20 cards and update balance?" with "OK" or "Cancel" if it is "OK" then set the cursor to 4 set lockScreen to true mySort compactRoutine set lockScreen to false end if else answer "Not enough cards to compact" with "OK" end if end mouseUp on compactRoutine global balance put 0 into debits put 0 into credits put 0 into balance go to card 1 put background field "Amount" into balance go to card 2 repeat 20 times get hilite of background button "Deposit" if it is true then add background field "Amount" to balance else subtract background field "Amount" from balance end if doMenu delete card end repeat go to card 1 put balance into background field "Amount" end compactRoutine on mySort go to card 1 sort datetime by field 1 end mySort -- part 5 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=450 top=281 right=342 bottom=512 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Export ----- HyperTalk script ----- on mouseUp --Set up the file-- put short name of this stack & " report" into fileName ask "Export text to what file?" with fileName if it is empty then exit mouseUp put it into fileName open file fileName set lockScreen to true set cursor to 4 go to card 1 --Main Loop-- --Header write "Date" & tab & "Check No." & tab & "Amount" & tab & "Desc" & "Cleared" & return & return to file fileName repeat for the number of cards write field 1 & tab to file fileName write field 2 & tab to file fileName get hilite of background button "Withdrawl" if it is true then write -field 3 & tab to file fileName else write field 3 & tab to file fileName end if write field 4 & tab to file fileName get hilite of background field "Cleared" if it is true then write "√" to file fileName else write " " to file fileName end if write return to file fileName go to next card end repeat close file fileName set lockScreen to false end mouseUp -- part 6 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=332 top=281 right=342 bottom=395 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Report ----- HyperTalk script ----- on mouseUp push card go to first card show card field "Info" show card field "Account Names" end mouseUp -- part 7 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=276 top=281 right=342 bottom=333 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Sort ----- HyperTalk script ----- on mouseUp answer "Sort by..." with "Date" or "Memo" or "Cancel" if it is "Cancel" then exit mouseUp end if set lockScreen to true if it is "Date" then go to first card sort datetime by field "Date" end if if it is "Memo/Account" then go to first card sort by field "Memo" end if set lockScreen to false go to first card end mouseUp -- part 8 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=227 top=281 right=342 bottom=277 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Help ----- HyperTalk script ----- on mouseUp set lockScreen to true push card go to first card put background field "Help" into theText pop card set lockScreen to false put theText into background field "Help" show background field "Help" end mouseUp -- part 9 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=175 top=281 right=342 bottom=228 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: About... ----- HyperTalk script ----- on mouseDown set lockScreen to true push card go to first card put background field "Credits" into theText pop card set lockScreen to false put theText into background field "Credits" show background field "Credits" end mouseDown on mouseUp hide background field "Credits" get the short name of this card if it is empty then put empty into background field "Credits" end if end mouseUp -- part 10 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=125 top=281 right=342 bottom=176 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: New ----- HyperTalk script ----- on mouseUp go to last card doMenu new card end mouseUp -- part 11 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=49 top=281 right=342 bottom=126 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Update Balance ----- HyperTalk script ----- on mouseUp global working,balance set the cursor to 4 set lockScreen to true searchRoutine set lockScreen to false end mouseUp on searchRoutine global working,balance put 0 into debits put 0 into credits put 1 into working repeat while working=1 ---- For Balance ---- get hilite of background button "Deposit" if it is false then --withdrawl add field "Amount" to debits else --deposit add field "Amount" to credits end if go to next card end repeat set numberFormat to "#.00" put credits-debits into background field "Balance" put credits-debits into balance end searchRoutine -- part 12 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=0 top=281 right=342 bottom=50 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Home ----- HyperTalk script ----- on mouseUp visual effect iris close go "Home" end mouseUp -- part 15 (field) -- low flags: 00 -- high flags: 0000 -- rect: left=281 top=36 right=53 bottom=352 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Date -- part 16 (field) -- low flags: 00 -- high flags: 0000 -- rect: left=423 top=33 right=52 bottom=484 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 22 -- text size: 14 -- style flags: 256 -- line height: 18 -- part name: -- part 18 (field) -- low flags: 00 -- high flags: 0000 -- rect: left=23 top=121 right=145 bottom=338 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 18 -- style flags: 0 -- line height: 24 -- part name: Pay To -- part 20 (field) -- low flags: 00 -- high flags: 0002 -- rect: left=405 top=121 right=140 bottom=494 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 22 -- text size: 14 -- style flags: 0 -- line height: 18 -- part name: Amount ----- HyperTalk script ----- on closeField set numberFormat to "#.00" add 0 to background field "Amount" end closeField -- part 21 (field) -- low flags: 00 -- high flags: 0000 -- rect: left=25 top=177 right=227 bottom=283 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Memo ----- HyperTalk script ----- on closeField click at 1,1 end closeField -- part 14 (field) -- low flags: 00 -- high flags: 0000 -- rect: left=26 top=243 right=263 bottom=220 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 22 -- text size: 14 -- style flags: 0 -- line height: 18 -- part name: Account Number -- part 22 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=242 top=34 right=53 bottom=285 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: ----- HyperTalk script ----- on mouseUp put the date into field "Date" end mouseUp -- part 26 (button) -- low flags: 00 -- high flags: 0005 -- rect: left=282 top=75 right=93 bottom=374 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Withdrawl ----- HyperTalk script ----- on mouseUp set hilite of background button "Withdrawl" to true set hilite of background button "Deposit" to false put "W" into field "Code" end mouseUp -- part 27 (button) -- low flags: 00 -- high flags: 4005 -- rect: left=382 top=75 right=93 bottom=458 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Deposit ----- HyperTalk script ----- on mouseUp set hilite of background button "Deposit" to true set hilite of background button "Withdrawl" to false put "D" into field "Code" end mouseUp -- part 28 (field) -- low flags: 00 -- high flags: 0000 -- rect: left=409 top=245 right=264 bottom=491 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Balance ----- HyperTalk script ----- on closeField set numberFormat to "#.00" add 0 to field "Balance" end closeField -- part 30 (field) -- low flags: 80 -- high flags: 0002 -- rect: left=353 top=147 right=165 bottom=382 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Code -- part 31 (field) -- low flags: 80 -- high flags: 0002 -- rect: left=455 top=186 right=203 bottom=478 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Cleared -- part 32 (button) -- low flags: 00 -- high flags: 4005 -- rect: left=418 top=167 right=183 bottom=488 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Cleared ----- HyperTalk script ----- on mouseUp get hilite of background button "Cleared" if it is true then set hilite of background button "Cleared" to false put "N" into field "Cleared" else set hilite of background button "Cleared" to true put "C" into field "Cleared" end if end mouseUp -- part 35 (field) -- low flags: 81 -- high flags: 2007 -- rect: left=17 top=27 right=266 bottom=497 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Help ----- HyperTalk script ----- on mouseUp get the short name of this card hide background field "Help" if it is not "first card" then put empty into background field "Help" end if end mouseUp -- part 36 (field) -- low flags: 81 -- high flags: 2004 -- rect: left=18 top=30 right=167 bottom=241 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 0 -- font id: 3 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Credits -- part 37 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=23 top=154 right=175 bottom=132 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: Memo/Account ----- HyperTalk script ----- on mouseUp set lockScreen to true push card go to card "first card" put card field "Account Names" into theList pop card set lockScreen to false DoList "Select","Cancel",theList,ONE get the result if it is not empty then put item 2 of it into background field "Memo" end if end mouseUp